package com.eastfair.builder;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.eastfair.security.annotation.EnableLoginArgResolver;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

import static com.eastfair.constant.BizConstant.UTIL_PACKAGE;

@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
@Configuration
@ComponentScan({
        UTIL_PACKAGE
})
@Slf4j
@EnableAspectJAutoProxy(proxyTargetClass = true, exposeProxy = true)
@MapperScan("com.eastfair.builder.dao")
@EnableDiscoveryClient
@EnableLoginArgResolver
@EnableFeignClients({UTIL_PACKAGE})
public class BuilderServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(BuilderServerApplication.class, args);
    }

}
